Chris Pollett > Old Classses >
CS174

( Print View )

Student Corner:
  [Grades Sec1]
  [Submit Sec1]
  [Class Sign Up Sec1]
  [
Lecture Notes]
  [Discussion Board]

Course Info:
  [Texts & Links]
  [Topics/Outcomes]
  [Outcomes Matrix]
  [Grading]
  [Class Protocols]
  [HW/Quiz Info]
  [Exam Info]
  [Regrades]
  [Honesty]
  [Additional Policies]
  [Announcements]

HW Assignments:
  [Hw1]  [Hw2]  [Hw3]
  [Hw4]  [Hw5]  [Quizzes]

Practice Exams:
  [Midterm]  [Final]

                           












CS174 Fall 2013Practice Midterm

To study for the midterm I would suggest you: (1) Know how to do (by heart) all the practice problems. (2) Go over your notes at least three times. Second and third time try to see how much you can remember from the first time. (3) Go over the homework problems. (4) Try to create your own problems similar to the ones I have given and solve them. (5) Skim the relevant sections from the book. (6) If you want to study in groups, at this point you are ready to quiz each other. The practice midterm is below. Here are some facts about the actual midterm: (a) It is closed book, closed notes. Nothing will be permitted on your desk except your pen (pencil) and test. (b) You should bring photo ID. (c) There will be more than one version of the test. Each version will be of comparable difficulty. (d) One problem (less typos) on the actual test will be from the practice test.

  1. Give an example of HTTP/1.1 request for the main index page on yahoo.com.
  2. Give an example validating HTML 5 document with title "Hi There". It should have meta tags so that robots do not index this site. The body should have an h1 tag and you should have an unordered list.
  3. Give the HTML to make a table for team standings that you might find in a newspaper for the National League West.
  4. Using CSS, show how to make a two column layout for a web page using div tags. Briefly explain the box model for the styling of HTML elements.
  5. Write a PHP program which counts the number of times a web page is accessed.
  6. Explain with a code example how to handle GET and POST data using PHP.
  7. Briefly explain the HTTP involved in setting and sending a cookie. How do sessions in PHP make use of Cookies?
  8. Show the PHP code needed to make a default connection to the local mysql DBMS to use the goo database to select all the rows from the foo table with id=5 and to write all of these rows to a tab delimited file hoo.txt.
  9. Give the command needed to see the commits that have occurred in a git repository between revision 1ea234 and bc5432. How could one tell who most recently changed line 86 in foo.txt in the repository?
  10. You know that a web page has a form with id checkme and that when it is submitted it will call the Javascript function doCheck(). You are not given how many field elements it has in advance. Give the code as a complete function for doCheck to check that all field values are non-null/non-empty.